/**
 * <p>Title: ServiceZM90.java</p>
 * <p>Description: </p>
 * <p>Copyright: Baosight Software LTD.co Copyright (c) 2002</p>
 * <p>Company: Baosight Software</p>
 * @author 高强
 * @version 1.0
 * <pre>Histroy:
 *          2012-12-12 下午05:23:37 高强  Create
 *</pre>
 */
package com.baosight.sczx.zm.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.threadlocal.UserSession;
import com.baosight.iplat4j.ep.ServiceEPBase;
import com.baosight.sczx.common.zm.basetools.StaticTools;
import com.baosight.sczx.common.zm.cInterface.cl.OperationHistory;
import com.baosight.sczx.zm.domain.ZM91;

/**
 * 
 * <p>Title: ServiceZM90.java</p>
 * <p>Description: 首页加载类</p>
 * <p>Copyright: Baosight Software LTD.co Copyright (c) 2002</p>
 * <p>Company: Baosight Software</p>
 * @author bobswang
 * @version 1.0
 * <pre>Histroy:
 *           2012-12-12 下午05:23:37 高强  Create
 *</pre>
 */
public class ServiceZM90 extends ServiceEPBase
{
	public EiInfo initLoad(EiInfo inInfo)
	{
		EiBlock useBlock = new EiBlock("index");
		useBlock.addBlockMeta(new ZM91().eiMetadata);
		Map map = new HashMap();
		map.put("fdUserId", UserSession.getLoginName());
		map.put("fdOrgCode", UserSession.getInSessionProperty("orgCode") ==null? "":UserSession.getInSessionProperty("orgCode").toString());
		List useList = dao.query("ZM91.userQueryAll",map);
		useBlock.addRows(useList);
		inInfo.addBlock(useBlock); 
		return inInfo;
	}
	
	public EiInfo update(EiInfo inInfo) {
	
//        String userId =UserSession.getLoginName().toString();
//        String orgCode =UserSession.getInSessionProperty("orgCode") ==null? "":UserSession.getInSessionProperty("orgCode").toString();
//		StaticTools.setQueryParameters(inInfo, "fdUserId", userId, true);//添加查询条件
//		StaticTools.setQueryParameters(inInfo, "fdOrgCode", orgCode, true);//添加查询条件
		EiInfo outInfo = super.update(inInfo, "ZM91.updateOder");
		return outInfo;
	}
}
